<#-- 导入模版定义文件-->
<#include "../template/template_editPage.ftl">
<@edit title="复制特殊价格信息">




<body class="input">

<script type="text/javascript">

    $().ready(function () {
        var $validateErrorContainer = $("#validateErrorContainer");
        var $validateErrorLabelContainer = $("#validateErrorContainer ul");
        var $validateForm = $("#inputForm");
        var $tab = $("#tab");
        // Tab效果
        $tab.tabs(".tabContent", {
            tabs:"input"
        });

        // 表单验证
        $validateForm.validate({
            errorContainer:$validateErrorContainer,
            errorLabelContainer:$validateErrorLabelContainer,
            wrapper:"li",
            errorClass:"validateError",
            ignoreTitle:true,
            rules:{
                "gameSpecialPrice.templateCode":{
                    required:true
                },
                "gameSpecialPrice.newTemplateCode":{
                    required:true
                }

            },
            messages:{
                "gameSpecialPrice.templateCode":{
                    required:"源模板名称！！"
                },
                "gameSpecialPrice.newTemplateCode":{
                    required:"目标模板名称！！"
                }

            },
            submitHandler:function (form) {
                $(form).find(":submit").attr("disabled", true);
                form.submit();
            }
        });

        <#if actionErrors??&&(actionErrors?size > 0)>
            $.dialog({type: "warn", content: "<#list errorMessages as list>${list}<br></#list>",
                modal: true, autoCloseTime: 3000});
        </#if>
    });



</script>

<div class="body">
    <div class="inputBar">
        <h1><span class="icon">&nbsp;</span>复制价格模板</h1>
    </div>
    <div style="display: none;" id="validateErrorContainer" class="validateErrorContainer">
        <div class="validateErrorTitle">以下信息填写有误,请重新填写</div>
        <ul></ul>
    </div>
    <form id="inputForm" class="validate"
          action="${web_base}/game/game_special_price!copy.htm"
          method="post">

        <ul class="tab">
            <li>
                <input type="button" value="基本信息" hidefocus="true"/>
            </li>
        </ul>
        <table class="inputTable tabContent">
                <tr>
                    <th>
                        源模板名称：
                    </th>
                    <td>
                        <select name="gameSpecialPrice.templateCode" class="formText {required: true}"
                                id="templateName">
                            <option value="" selected="selected">
                                -请选择模板名称-
                            </option>
                            <#if specialPriceList??>
                                <#list specialPriceList as obj>
                                    <option value="${obj.templateCode!}">${(obj.templateName)!}</option>
                                </#list>
                            </#if>
                        </select>
                        <label class="requireField">*</label>

                    </td>
                </tr>
            <tr>
                <th>
                    目标模板名称：
                </th>
                <td>
                    <select name="gameSpecialPrice.newTemplateCode" class="formText {required: true}"
                            id="newTemplateName">
                        <option value="" selected="selected">
                            -请选择模板名称-
                        </option>
                        <#if templateList??>
                            <#list templateList as obj>
                                <option value="${obj.templateCode!}">${(obj.templateName)!}</option>
                            </#list>
                        </#if>
                    </select>
                    <label class="requireField">*</label>

                </td>
            </tr>


        </table>
        <div class="buttonArea">
            <input type="submit" class="formButton"  value="复  制" hidefocus="true" />&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="button" class="formButton" onclick="window.history.back(); return false;" value="返  回"
                   hidefocus="true"/>
        </div>
    </form>
</div>
</body>
</@edit>
